QReadWriteLock: fix data race on weakly-ordered memory architectures
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sat, 28 Feb 2026 17:55:04 +0000 (20:55 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Sat, 28 Feb 2026 17:55:04 +0000 (20:55 +0300)
commit3fe56c1b84501ab600d20add215d11d5eb798a88
treead67f609fec2a81ad1d9657a68b1ac4e6f026099
parentf2ed214e307244e5a345e4b60b9236edc160a9af
QReadWriteLock: fix data race on weakly-ordered memory architectures

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit?id=4fd88011fa7975ce
Last-Update: 2025-12-14

The fix changes the relaxed load of d_ptr in lockFor{Read,Write} after
the acquire of the mutex to an acquire load, to establish
synchronization with the release store of d_ptr when converting from an
uncontended lock to a contended lock.

Gbp-Pq: Name qreadwritelock_data_race_2.diff
src/corelib/thread/qreadwritelock.cpp
tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp